package com.zrt.springboot.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zrt.springboot.entity.Menu;
import com.zrt.springboot.entity.River;
import com.zrt.springboot.mapper.MenuMapper;
import com.zrt.springboot.mapper.RiverMapper;
import com.zrt.springboot.service.IRiverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RiverServiceImpl extends ServiceImpl<RiverMapper, River> implements IRiverService {

    @Autowired
    private RiverMapper riverMapper;

    @Override
    public int insert(River river) {
        return riverMapper.insert(river);
    }

    @Override
    public List<Double> selectTheData(String sensor_id, String startTime, String endTime) {
        return riverMapper.selectTheData(sensor_id,startTime,endTime);
    }

    @Override
    public List<String> selectTime(String sensorId,String startTime,String endTime) {
        return riverMapper.selectTheTime(sensorId,startTime,endTime);
    }
}
